<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div style="height: 450px;" id="repairChar"></div>
<input type="text" name="dateDateStr" id="dateDateStr" value="${dateDateStr }">
<input type="text" id="data0" value="${data0 }">
<input type="text" id="data1" value="${data1 }">
<input type="text" id="data2" value="${data2 }">
<input type="text" id="data3" value="${data3 }">
<input type="text" id="data4" value="${data4 }">
<input type="text" id="data5" value="${data5 }">
<input type="text" id="data6" value="${data6 }">
<input type="text" id="data7" value="${data7 }">
<script>
	$(function() {
		var dateDateStr = $("#dateDateStr").val();
		var data0 = $("#data0").val();
		var data1 = $("#data1").val();
		var data2 = $("#data2").val();
		var data3 = $("#data3").val();
		var data4 = $("#data4").val();
		var data5 = $("#data5").val();
		var data6 = $("#data6").val();
		var data7 = $("#data7").val();
		
		var xData = dateDateStr.split(",");
		var yData0 = data0.split(",");
		var yData1 = data1.split(",");
		var yData2 = data2.split(",");
		var yData3 = data3.split(",");
		var yData4 = data4.split(",");
		var yData5 = data5.split(",");
		var yData6 = data6.split(",");
		var yData7 = data7.split(",");
		var repairChar = echarts.init(document.getElementById('repairChar'));
		var repairCharOption = {
			title : {
				text : '工单统计',
				subtext : ''
			},
			tooltip : {
				trigger : 'axis'
			},
			legend : {
				data : ['未派发', '已派发', '已确认', '维修中', '已完成', '已评价', '已反馈', '已删除']
			},
			toolbox : {
				show : true,
				feature : {
					mark : {
						show : true
					},
					dataView : {
						show : true,
						readOnly : false
					},
					magicType : {
						show : true,
						type : ['line', 'bar']
					},
					restore : {
						show : true
					},
					saveAsImage : {
						show : true
					}
				}
			},
			calculable : true,
			xAxis : [{
				type : 'category',
				data : xData
			}],
			yAxis : [{
				type : 'value',
				splitArea : {
					show : true
				}
			}],
			series : [{
				name : '未派发',
				type : 'bar',
				data : yData0
			}, {
				name : '已派发',
				type : 'bar',
				data : yData1
			}, {
				name : '已确认',
				type : 'bar',
				data : yData2
			}, {
				name : '维修中',
				type : 'bar',
				data : yData3
			}, {
				name : '已完成',
				type : 'bar',
				data : yData4
			}, {
				name : '已评价',
				type : 'bar',
				data : yData5
			}, {
				name : '已反馈',
				type : 'bar',
				data : yData6
			}, {
				name : '已删除',
				type : 'bar',
				data : yData7
			}]
		};
		repairChar.setOption(repairCharOption);
	}); 
</script>
